package com.qys.livesMall.app.user.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户收货地址
 * </p>
 *
 * @author dp
 * @since 2023-04-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("h2_app_user_address")
@Schema(name = "H2AppUserAddress对象", description = "用户收货地址")
public class H2AppUserAddress implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @TableId("id")
    private String id;

    @Schema(description = "用户id")
    @TableField("user_id")
    private String userId;

    @Schema(description = "国家")
    @TableField("country")
    private Long country;

    @Schema(description = "国家名称")
    @TableField("country_name")
    private String countryName;

    @Schema(description = "收货人姓名")
    @TableField("user_name")
    private String userName;

    @Schema(description = "邮编")
    @TableField("postal_code")
    private String postalCode;

    @Schema(description = "邮箱")
    @TableField("email")
    private String email;

    @Schema(description = "收货人地址")
    @TableField("address")
    private String address;

    @Schema(description = "是否默认地址")
    @TableField("default_address")
    private Boolean defaultAddress;

    @Schema(description = "创建时间")
    @TableField("create_time")
    @JsonIgnore
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @TableField("update_time")
    @JsonIgnore
    private LocalDateTime updateTime;

    @Schema(description = "联系电话")
    @TableField("mobile")
    private String mobile;

    @Schema(description = "城市")
    @TableField("city")
    private String city;

    @Schema(description = "地标")
    @TableField("landmark")
    private String landmark;
}
